<?php require_once("../common/config.inc.php");?>
<?php	
$breadcrumbText=array('1' => 'Event News', '2' => 'MERDJ News','3' =>'Notification');
$newsType=null;
$currentNews=null;
	init();		
	
	function init(){
		$id=$_GET["id"];		
		if($id==null || $id==""){
			header("Location: NewsSummary.php?type=1");
		    exit();
		}	
		loadNewsData();
	}
	
	function loadNewsData(){	
		//hard code before news system online

		$allNewsArray=array(
			//1-events	
			array('id'=>'10000010','content'=>'','pageUrl'=>'201205/20120507_10000010.php','type'=>'1','createDate'=>'2012-05-07','title'=>'Visit of Prof. Dr. Fernando Gonz&#x00E1;lez-Jim&#x00E9;nez'),
			array('id'=>'10000009','content'=>'','pageUrl'=>'201202/20120220_10000009.php','type'=>'1','createDate'=>'2012-02-20','title'=>'In Memoriam Professor Igor Petrovich Suzdalev'),
			array('id'=>'10000008','content'=>'','pageUrl'=>'201202/20120220_10000008.php','type'=>'1','createDate'=>'2012-02-20','title'=>'In Memoriam Professor Attila V&#x00E9;rtes'),			
			array('id'=>'10000007','content'=>'','pageUrl'=>'201112/20111221_10000007.php','type'=>'1','createDate'=>'2011-12-21','title'=>'Visit of Dr. Jean-Marc Greneche'),
			array('id'=>'10000006','content'=>'','pageUrl'=>'201111/20111110_10000006.php','type'=>'1','createDate'=>'2011-11-10','title'=>'Visiting Professor Airat M. Khasanov from America'),					
			array('id'=>'10000005','content'=>'','pageUrl'=>'201111/20111110_10000005.php','type'=>'1','createDate'=>'2011-11-10','title'=>'Visiting Professor Alexandre Rykov from Russian'),				
			array('id'=>'10000001','content'=>'<p>This is a dymantic test string!</p>','pageUrl'=>'201111/20111107_10000001.php','type'=>'1','createDate'=>'2011-11-07','title'=>'In Memoriam Rudolf L. M&#246;&#223;bauer'),		
			array('id'=>'10000002','content'=>'','pageUrl'=>'201110/20111021_10000002.php','type'=>'1','createDate'=>'2011-10-21','title'=>'Participation of Profs. ZHANG Tao and WANG Junhu in ICAME2011'),
			array('id'=>'10000003','content'=>'','pageUrl'=>'201105/20110504_10000003.php','type'=>'1','createDate'=>'2011-05-04','title'=>'Dr. Paulo de Souza of CSIRO visit MEDC'),
			array('id'=>'10000004','content'=>'','pageUrl'=>'201009/20100901_10000004.php','type'=>'1','createDate'=>'2010-09-01','title'=>'M&#246;ssbauer Effect Data Center (MEDC) Settled in DICP'),

			//2-MERDJ
			array('id'=>'20000015','content'=>'','pageUrl'=>'201204/20120424_20000015.php','type'=>'2','createDate'=>'2012-04-24','title'=>'MERDJ 3503 ISSUE'),
			array('id'=>'20000014','content'=>'','pageUrl'=>'201204/20120405_20000014.php','type'=>'2','createDate'=>'2012-04-05','title'=>'MERDJ 3502 ISSUE'),
			array('id'=>'20000013','content'=>'','pageUrl'=>'201202/20120220_20000013.php','type'=>'2','createDate'=>'2012-02-20','title'=>'MERDJ 3501 ISSUE'),
			array('id'=>'20000012','content'=>'','pageUrl'=>'201201/20120106_20000012.php','type'=>'2','createDate'=>'2012-01-06','title'=>'MERDJ 3410 ISSUE'),
			array('id'=>'20000011','content'=>'','pageUrl'=>'201112/20111221_20000011.php','type'=>'2','createDate'=>'2011-12-21','title'=>'MERDJ 3409 ISSUE'),
			array('id'=>'20000010','content'=>'','pageUrl'=>'201112/20111207_20000010.php','type'=>'2','createDate'=>'2011-12-07','title'=>'MERDJ 3408 ISSUE'),
			array('id'=>'20000001','content'=>'','pageUrl'=>'201110/20111021_20000001.php','type'=>'2','createDate'=>'2011-10-21','title'=>'MERDJ 3407 ISSUE'),
			array('id'=>'20000003','content'=>'','pageUrl'=>'201108/20110816_20000003.php','type'=>'2','createDate'=>'2011-08-16','title'=>'MERDJ 3406 ISSUE'),		
			array('id'=>'20000004','content'=>'','pageUrl'=>'201106/20110602_20000004.php','type'=>'2','createDate'=>'2011-06-02','title'=>'MERDJ 3405 ISSUE'),
			array('id'=>'20000005','content'=>'','pageUrl'=>'201105/20110505_20000005.php','type'=>'2','createDate'=>'2011-05-05','title'=>'MERDJ 3404 ISSUE'),
			array('id'=>'20000006','content'=>'','pageUrl'=>'201104/20110414_20000006.php','type'=>'2','createDate'=>'2011-04-14','title'=>'MERDJ 3403 ISSUE'),
			array('id'=>'20000007','content'=>'','pageUrl'=>'201103/20110324_20000007.php','type'=>'2','createDate'=>'2011-03-24','title'=>'MERDJ 3402 ISSUE'),
			array('id'=>'20000008','content'=>'','pageUrl'=>'201102/20110221_20000008.php','type'=>'2','createDate'=>'2011-02-21','title'=>'MERDJ 3401 ISSUE'),
			array('id'=>'20000009','content'=>'','pageUrl'=>'201101/20110115_20000009.php','type'=>'2','createDate'=>'2011-01-15','title'=>'MERDJ 3310 ISSUE'),
			array('id'=>'20000002','content'=>'','pageUrl'=>'201011/20101101_20000002.php','type'=>'2','createDate'=>'2010-11-01','title'=>'MERDJ has been published by DICP'),	

			//3-Notice
			array('id'=>'30000005','content'=>'','pageUrl'=>'201201/20120105_30000005.php','type'=>'3','createDate'=>'2012-01-05','title'=>'OSSM2012 Announcement'),
			array('id'=>'30000001','content'=>'','pageUrl'=>'201110/20111027_30000001.php','type'=>'3','createDate'=>'2011-10-27','title'=>'2012 Price List available'),		
			array('id'=>'30000002','content'=>'','pageUrl'=>'201110/20111021_30000002.php','type'=>'3','createDate'=>'2011-10-21','title'=>'Database search function available'),		
			array('id'=>'30000003','content'=>'','pageUrl'=>'201104/20110425_30000003.php','type'=>'3','createDate'=>'2011-04-25','title'=>'New way to download Journals'),
			array('id'=>'30000004','content'=>'','pageUrl'=>'201007/20100701_30000004.php','type'=>'3','createDate'=>'2010-07-01','title'=>'Relocation of the M&#246;ssbauer Effect Data Center'),
		);				
		foreach ($allNewsArray as $newsObj){	
			if($newsObj["id"]==$_GET["id"]){
				$GLOBALS[currentNews]=$newsObj;
			}
		}
		if($GLOBALS[currentNews]==null){
			header("Location: NewsSummary.php?type=1");
		    exit();			
		}else{
			header("Location: ".$GLOBALS[currentNews]["pageUrl"]);
			exit();	
		}
	}
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>M&ouml;ssbauer Effect Data Center News - <? echo $GLOBALS[currentNews]["title"] ?> </title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="../css/medc.css"/>
<link rel="stylesheet" type="text/css" href="../allstyles.css"/>
</head>  
<body>
<div id="header">
	<?php 
	require_once "../common/config.inc.php";
	require_once "../common/header.inc.php"
	?>
</div>	

<div id="mainarea">

<div id="toparea">
<p class="breadcrumb">Location: <a href="<?php echo WEB_ROOT ?>">Home</a>
&gt; <a href="<?php echo WEB_ROOT ?>news/NewsSummary.php?type=1">News</a>
&gt;<a href="<?php echo WEB_ROOT ?>news/NewsSummary.php?type=<? echo $GLOBALS[newsType] ?>"><? echo $GLOBALS[breadcrumbText][$GLOBALS[currentNews]["type"]] ?></a></p>
 </div>

<div id="newsContent">
<p class="Header" align="center"><? echo $GLOBALS[currentNews]["title"] ?></p>

<? echo $GLOBALS[currentNews]["content"] ?>

</div> 
</div><!--end of mainarea-->
<div class="myclear"></div>
<div id="footer" class="center"><?php include "../common/footer.inc.php"?></div>
</body>
</html>